--控制层 C
--负责控制操作
Control = {}
local self = Control

self.controls = {}

function self:Init()
    self:Invoke("Init")
end

function self:UnInit()
    self:Invoke("UnInit")
end

function self:Register(control)
    table.insert(self.controls, control)
end

function self:Invoke(funcname, args)
    local t_func = nil
    for i, control in ipairs(self.controls) do
        t_func = control[funcname]
        if t_func then
             t_func(control, args)
        end
    end
end

return self
